1. Field of the Invention
The present invention relates to a detecting device for detecting operating modes, and more particularly, to a detecting device utilizing a hold-up unit for delaying button signals of a system in order to detect the operating mode of the system.
2. Description of the Prior Art
Digital cameras have become consumer electronic products nowadays. Different from conventional cameras, there are various operation statuses or modes for a digital camera, such like, for example, Power-ON status, Power-OFF status, Preview mode, Playback mode, universal serial bus (USB) in status, etc. Therefore, it is necessary for a digital camera system to detect the current status and mode to perform correctly.
Please refer to FIG. 1A, a circuit diagram of a detecting circuit 100 applied in a digital camera for detecting the operating mode of the digital camera in the prior art. Detecting circuit 100 includes a pulse generator 110, button detecting circuits 130, and a peripheral device detecting circuit 150. The structures, connections and the operations of the components above are illustrated as below.
When a battery installed in the camera, the voltage of the battery, Vbat, is first filtered by the high-pass filter composed by capacitor C1 and resister R1. A one-shot pulse signal is generated at node N1 then. The peak voltage of the one-shot pulse signal equals to the battery voltage, Vbat. Therefore, when the amplitude of the one-shot pulse signal exceeds the threshold voltage of switch S1, switch S1 is turned on. Consequently, the voltage level at node N2 is pulled down to turn on switch S2. When switch S2 is turned on, the voltage at node N3 starts rising. The high-pass filter composed by capacitor C2 and resister R2 then outputs a one-shot pulse signal to pin Power_ON/OFF.
Some digital cameras further deal with the one-shot pulse signal to complete the power-on procedure. For example, this one-shot pulse signal received from pin Power_ON/OFF may be further transmitted to the digital signal processor of the camera system. When receiving the pulse signal, the digital signal processor may turns on a multi-channel power converter to generate voltage sources with different voltages, such as a 3.3V voltage.
Usually, operation buttons, such like a switch button for turning on/off the camera, a preview button for previewing the taken photos and a playback button for recording and playing videos, are set on the camera case of a digital camera. As shown in FIG. 1, button detecting circuits 130 are installed correspondingly to operation buttons. Besides, a connecting interface for peripheral devices, for instance, a universal serial bus (USB), is usually set in the digital camera as well in order to connect to external storage devices.
When a camera finishes the power-on procedure, one switch S3 and one switch S4 are turned on if one button B1 of the camera is triggered. The voltage level at node N2 is accordingly pulled down then. Switch S2 is turned on again, such that pin Power_ON/OFF again outputs a one-shot pulse signal, and a detecting pin B1_D, which is corresponding to button B1, outputs a signal reverse to the signal triggering the pin. The firmware of the digital camera system would enter an operating mode or status, for example, the power-on status, the power-off status, the preview mode, the playback mode, etc., according to the pulse signal output by pin Power_ON/OFF and the output signal of the detecting pin.
If there is a peripheral device connected to the USB interface of the system, input U50 of detecting circuit 150 receives a signal at logic high level. Switch S51 is turned on in accordance, and pin Power_ON/OFF outputs a one-shot pulse signal as well.
In FIG. 1A, the corresponding signal level of detecting pin B1_D remains for a period of time due the delaying circuit including resistor R3 and capacitor C3. Please refer to FIG. 1B. At time t1, button B1 of button detecting circuit 130 is pressed down, the bias voltage of capacitor C3, VC3, is quickly charged to 3.3V, and switch S3 and switch S4 are turned on. Detecting pin B1_D then generates a detecting signal SB1_D at a logic low level. When the button B1 is released at time t2, the electric charge accumulated on capacitor C3 begins to discharge till bias voltage VC3 of capacitor C3 reduces to lower than the turn-on threshold voltage Vth of switch S4 at time t3. Switch S4 is turned off then, and detecting signal SB1_D transits to the logic high level. Please refer to FIG. 1B. It is observed that the interval between time t2, at which the button B1 is released, and time t3, at which the detecting signal SB1_D transits to the logic high level, is a hold-up time. The hold-up time enables the firmware of the digital camera system to determine which operation mode is the current mode of the camera system according to a one-shot pulse signal and a detecting signal.
However, detecting circuit 100 in FIG. 1A may have problems. For button B1 adopts positive logic operation, that is, the operation of the button is electrically connected to the power, some additional pins connected to the power are required when implementing the detecting circuit in FIG. 1A into integrated circuit. The volume and the size of detecting circuit 100 may increase in accordance.
Besides being a component of the time delaying circuit, capacitor C3 is also utilized to prevent the error function of switch S3 due the abnormal energy injection caused by electrostatic discharge. Therefore, a capacitance larger than 10 uF is usually adopted. For capacitor C3 and resistor R3 are discrete components and the accuracy may not high enough mostly, large variation of hold-up time may be introduced and the reliability of the circuit may decrease.
Besides, the switches are implemented by discrete transistors, such as n-channel metal-oxide-semiconductors (NMOS) or bipolar junction transistors (BJT). Therefore, the threshold voltage of each switch may be different. For the accuracy of components may not be high enough, the transistors may not be turned on under the predetermined voltage. This is called the sub-threshold phenomenon, which enlarges the possibility of wrongly determining the status and modes of the camera system.
In addition to the above problem of reliability, the circuit shown in FIG. 1A has to utilize capacitor C1, resistor R1, capacitor C2 and resistor R2 to form high-pass filters to achieve the need to output one-shot pulse signals. Diodes D1 and D2 are further required to clamp negative voltage generated during the RC charging/discharging, for not damaging the switches and circuit in connected equipments or stages. Therefore, the number of the components of the circuit increases, and so does the cost of the circuit.